package gwtI18nEditor.dialogs;

import java.io.File;

import javax.swing.JFileChooser;

@SuppressWarnings("serial")
public class OpenProjectDialog extends JFileChooser {
	
	public OpenProjectDialog() {
		super();
		setDialogTitle("Open Project...");
		setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
		setAcceptAllFileFilterUsed(false);
	}
	
	public File execute() {
		if (showOpenDialog(null)!=JFileChooser.APPROVE_OPTION) return null;
		File result = getSelectedFile();
		if (!result.isDirectory()) return null;
		return result;
	}

}
